<?php
class ShiquWidget extends Widget{

	public function render($data){
            // 下拉选择 与 js 变量的$d值
        
        $data['allCity']   = M('city')->where(array('hot_flag'=>1))->select();
        $data['allArea']   = M('area')->select();
        
        $data['e_allCity']   = json_encode($data['allCity']);
        $data['e_allArea']   = json_encode($data['allArea']);
      

      
        // 现在城市
        $qid = $data['now_city_id'];
		if($qid>0){
			$data['citycode']=$qid;
		}
		// 现在分区
		$jid = $data['now_area_id'];
		if($jid>0){
			$data['area_id']=$jid;
		}
        $content = $this->renderFile('shiqu',$data);

        return $content;
	}
}

?>

